control = "tmp"
measure = "tmp10"

filename = "/log_arrival.log"

datafile_control = paste(control, filename, sep="")
datafile_measure = paste(measure, filename, sep="")

colnames = c("ia", "count1")
cdata <- read.table(datafile_control, col.names=colnames)

colnames = c("ia", "count2")
mdata <- read.table(datafile_measure, col.names=colnames)

mergedata = merge(cdata, mdata)
dt <- data.frame(prob=data1[[5]], n_accessed=data2[[4]])

dtx <- dt[dt$n_accessed > 3, ]

res <- chisq.test(dtx$n_accessed, rescale.p = T, p = dtx$prob)